/* 响应式工具样式 */

/* 容器最大宽度限制 */
.container-fluid {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 响应式网格系统补充 */
.row-responsive {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.col-responsive {
  padding: 0 10px;
  margin-bottom: 20px;
}

/* 移动端优先的按钮组 */
.btn-group-mobile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

@media (min-width: 768px) {
  .btn-group-mobile {
    flex-direction: row;
    width: auto;
  }
}

/* 响应式表格容器 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive .el-table {
  min-width: 600px;
}

@media (max-width: 768px) {
  .table-responsive .el-table {
    font-size: 12px;
  }
  
  .table-responsive .el-table .el-table__cell {
    padding: 6px 4px;
  }
}

/* 移动端卡片优化 */
.card-mobile {
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .card-mobile {
    margin-bottom: 10px;
    border-radius: 6px;
  }
  
  .card-mobile .el-card__body {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .card-mobile .el-card__body {
    padding: 8px;
  }
}

/* 响应式间距 */
.spacing-responsive {
  padding: 20px;
}

@media (max-width: 768px) {
  .spacing-responsive {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .spacing-responsive {
    padding: 10px;
  }
}

/* 响应式字体大小 */
.text-responsive {
  font-size: 16px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .text-responsive {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .text-responsive {
    font-size: 12px;
    line-height: 1.4;
  }
}

/* 移动端隐藏/显示工具类 */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
}

/* 响应式表单 */
.form-responsive .el-form-item {
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .form-responsive .el-form-item {
    margin-bottom: 15px;
  }
  
  .form-responsive .el-form-item__label {
    font-size: 14px;
  }
  
  .form-responsive .el-input__inner,
  .form-responsive .el-textarea__inner {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .form-responsive .el-form-item {
    margin-bottom: 12px;
  }
  
  .form-responsive .el-form-item__label {
    font-size: 12px;
    margin-bottom: 5px;
  }
  
  .form-responsive .el-input__inner,
  .form-responsive .el-textarea__inner {
    font-size: 12px;
  }
}

/* 响应式对话框 */
@media (max-width: 768px) {
  .el-dialog {
    width: 95% !important;
    margin: 5vh auto !important;
  }
  
  .el-dialog__header {
    padding: 15px 15px 10px;
  }
  
  .el-dialog__body {
    padding: 15px;
  }
  
  .el-dialog__footer {
    padding: 10px 15px 15px;
  }
}

@media (max-width: 480px) {
  .el-dialog {
    width: 98% !important;
    margin: 2vh auto !important;
  }
  
  .el-dialog__header {
    padding: 12px 12px 8px;
  }
  
  .el-dialog__body {
    padding: 12px;
  }
  
  .el-dialog__footer {
    padding: 8px 12px 12px;
  }
  
  .el-dialog__title {
    font-size: 16px;
  }
}

/* 响应式导航 */
.nav-responsive {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .nav-responsive {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .nav-responsive {
    padding: 0 10px;
    flex-wrap: wrap;
  }
}

/* 响应式图标按钮 */
.icon-btn-responsive {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 480px) {
  .icon-btn-responsive span {
    display: none;
  }
  
  .icon-btn-responsive {
    gap: 0;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .touch-friendly {
    min-height: 44px;
    min-width: 44px;
  }
  
  .touch-friendly-small {
    min-height: 36px;
    min-width: 36px;
  }
}

/* 横屏优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .landscape-optimize {
    height: 90vh;
    overflow-y: auto;
  }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .high-dpi-optimize {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}